﻿<%@ Page Title="我的提案" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="MyMotionList.aspx.cs" Inherits="OUSMS.MyMotionList" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="topchannel">
        我的提案
    </div>
    <asp:GridView ID="myMotionsGridView" runat="server" CssClass="table1" AutoGenerateColumns="False"
        ItemType="OUSMS.AppLogic.DataAccessLayer.Motions" EmptyDataText="你还没有提交提案"
        OnRowDataBound="myMotionsGridView_RowDataBound" ShowHeaderWhenEmpty="True" AllowPaging="True">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <asp:Label ID="indexLbl" runat="server" Font-Bold="true"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="false" Width="30px"/>
                <ItemStyle HorizontalAlign="center" VerticalAlign="Middle" Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="标题">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Item.Title.Length>20?Item.Title.Substring(0,20)+"...":Item.Title %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="false" />
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="250px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="提交时间">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Item.SumbitDateTime.HasValue?Item.SumbitDateTime.Value.ToString("yyyy/MM/dd HH:mm"):"尚未提交"%>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="false" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="100px" Wrap="false" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="当前状态">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Item.Status%>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="false" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="150px" Wrap="false" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="预审意见">
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# Item.PrejudicComment%>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="false" />
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" Width="300px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:HyperLink ID="viewHyperLink" runat="server" Font-Bold="true" Font-Underline="true" NavigateUrl='<%# "MotionDetail.aspx?MID=" + Item.ID %>'>查看</asp:HyperLink>
                    <asp:HyperLink ID="modifyHyperLink" Font-Bold="true" runat="server" Font-Underline="true" NavigateUrl='<%# "ModifyMotion.aspx?MID=" + Item.ID %>'>修改</asp:HyperLink>
                    <asp:LinkButton ID="deleteLinkButton" runat="server" CommandArgument='<%# Item.ID %>' OnClick="deleteLinkButton_Click" OnClientClick="javascript:return confirm('您确定要删除此文件吗？')">删除</asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle"
                    Wrap="false" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="120px" Wrap="false" />
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="row2" />
        <PagerStyle CssClass="rowend" HorizontalAlign="Center" />
        <RowStyle CssClass="row1" />
        <AlternatingRowStyle CssClass="row2" />
        <EmptyDataRowStyle CssClass="row1" />
    </asp:GridView>
</asp:Content>
